package org.dromara.product.domain.bo;

import org.dromara.product.domain.KyProductDetails;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 商品详情业务对象 ky_product_details
 *
 * @author kuyu
 * @date 2023-12-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = KyProductDetails.class, reverseConvertGenerate = false)
public class KyProductDetailsBo extends BaseEntity {

    /**
     * 编号
     */
    @NotNull(message = "编号不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 商品
     */
    @NotNull(message = "商品不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * 编码
     */
    @NotBlank(message = "编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String code;

    /**
     * 仓库
     */
    @NotNull(message = "仓库不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long warehouseId;

    /**
     * 库位
     */
    @NotNull(message = "库位不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long zoneId;

    /**
     * 数量
     */
    @NotNull(message = "数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal number;

    /**
     * 批次号
     */
    @NotBlank(message = "批次号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String batchNo;

    /**
     * 价格
     */
    @NotNull(message = "价格不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal price;

    /**
     * 使用状态
     */
    @NotNull(message = "使用状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer useStatus;

    /**
     * 管理员
     */
    @NotBlank(message = "管理员不能为空", groups = { AddGroup.class, EditGroup.class })
    private String mgrUsr;

    /**
     * 入库单号
     */
    @NotBlank(message = "入库单号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String inNo;


}
